import request from '@/utils/request'

// 创建检验单身
export function createInspectInfo(data) {
  return request({
    url: '/qms/inspect-info/create',
    method: 'post',
    data: data
  })
}

// 更新检验单身
export function updateInspectInfo(data) {
  return request({
    url: '/qms/inspect-info/update',
    method: 'put',
    data: data
  })
}

// 删除检验单身
export function deleteInspectInfo(id) {
  return request({
    url: '/qms/inspect-info/delete?id=' + id,
    method: 'delete'
  })
}

// 获得检验单身
export function getInspectInfo(id) {
  return request({
    url: '/qms/inspect-info/get?id=' + id,
    method: 'get'
  })
}

// 获得检验单身分页
export function getInspectInfoPage(query) {
  return request({
    url: '/qms/inspect-info/page',
    method: 'get',
    params: query
  })
}

// 导出检验单身 Excel
export function exportInspectInfoExcel(query) {
  return request({
    url: '/qms/inspect-info/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
